package com.example.demo.template;

import java.awt.*;

import javax.swing.*;

/**
 * @author Liu Huijun
 * @date 2023-02-09
 */
public class MyFrame extends JFrame {

    public MyFrame(String title) throws HeadlessException {
        super(title);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setSize(300, 300);
        this.setVisible(true);

    }

    @Override
    public void paint(Graphics g) {
        super.paint(g);
        String msg = "I Love You";
        g.drawString(msg, 100, 100);
    }
}
